/*************************
查看
* */
<template>
  <div>
    <el-dialog
      title="事件考核查看"
      :close-on-click-modal="true"
      :visible.sync="visible"
      top="8vh"
      width="70%"
      @close="closeDialog()"
    >
      <el-form ref="dataForm" :model="dataForm"  class="boxsty"  label-width="100px"  @keyup.enter.native="dataFormSubmit()"  >
        <el-form-item label="标题：" prop="sjbt">
          <span>{{dataForm.sjbt}}</span>
        </el-form-item>

        <el-form-item label="考核周期：" prop="khzq">
          <span>{{dataForm.khzq}}</span>
        </el-form-item>

        <el-form-item label="描述：" prop="sjdesc">
          <span>{{dataForm.sjdesc}}</span>
        </el-form-item>

        <el-form-item label="考核对象：">
          <el-table
            ref="multipleTable"
            :data="tableData"
            height="150"
            style="width: 100%;"
            tooltip-effect="dark"
          >
            <el-table-column type="index"   width="70" align="center" label="序号" ></el-table-column>
            <el-table-column
              v-if="showRY"
              prop="username"
              label="员工编号" min-width="120" align="center"  show-overflow-tooltip>
            </el-table-column>
            <el-table-column
              v-if="showRY"
              prop="realname"
              label="姓名" min-width="120" align="center"  show-overflow-tooltip>
            </el-table-column>
            <el-table-column
              v-if="showRY"
              prop="deptName"
              label="部门" min-width="120" align="center"  show-overflow-tooltip>
            </el-table-column>

            <el-table-column
              v-if="!showRY"
              prop="realname"
              label="机构名称"
              min-width="120" align="center"  show-overflow-tooltip>
            </el-table-column>

            <el-table-column
              prop="lbms"
              width="120"
              label="类别"  align="center" show-overflow-tooltip>
            </el-table-column>
            <el-table-column
              prop="yjms"
              width="120"
              label="依据"  align="center"  show-overflow-tooltip>
            </el-table-column>
            <el-table-column
              prop="bz"
              label="标准" align="center"  show-overflow-tooltip>
            </el-table-column>
            <el-table-column
              prop="zbgz"
              label="指标规则" align="center"  width="120" show-overflow-tooltip>
            </el-table-column>

            <el-table-column
              prop="jjx"
              width="120"
              align="center"
              label="奖金项"
              show-overflow-tooltip
            ></el-table-column>

            <el-table-column
              prop="jkjj"
              header-align="center"
              width="100"
              align="center"
              label="加扣奖金"
              show-overflow-tooltip
            ></el-table-column>

            <el-table-column
              prop="jkfz"
              label="加扣分值" align="center"  width="100" show-overflow-tooltip>
            </el-table-column>

            <el-table-column
              align="center"
              prop="xgjj"
              label="评审奖金" width="100" >
            </el-table-column>

            <el-table-column
              prop="xgfz"
              label="评审分值" align="center"  width="100">
            </el-table-column>

            <el-table-column
              prop="ssjj"
              label="申诉奖金" align="center"  width="100">
              <template slot-scope="scope">
                {{scope.row.ssjj}}
              </template>
            </el-table-column>

            <el-table-column
              prop="ssfz"
              label="申诉分值" align="center"  width="100">
              <template slot-scope="scope">
                {{scope.row.ssfz}}
              </template>
            </el-table-column>

            <el-table-column
              fixed="right"
              prop="zzjj"
              label="最终加扣奖金" align="center"  width="100">
              <template slot-scope="scope">
                {{scope.row.zzjj}}
              </template>
            </el-table-column>

            <el-table-column
              fixed="right"
              prop="zzfz"
              label="最终加扣分值" align="center"  width="100">
              <template slot-scope="scope">
                {{scope.row.zzfz}}
              </template>
            </el-table-column>

          </el-table>
        </el-form-item>


        <el-form-item label="申诉理由：" prop="ssly" v-if="sslyShow">
          <span>{{dataForm.ssly}}</span>
        </el-form-item>

        <el-form-item label="申诉回复：" prop="sshf" v-if="sshfShow">
          <span>{{dataForm.sshf}}</span>
        </el-form-item>

      </el-form>

      <span slot="footer" class="dialog-footer">
         <el-button type="primary" plain @click="closeDialog()">返回</el-button>
        <!--<el-button type="primary" plain @click="closeDialog()">确定</el-button>-->
      </span>
    </el-dialog>
  </div>
</template>

<script>
    export default {
        data() {
            return {
                tableData:[],
                showRY:true,
                visible: false,
                dataForm: {},
                sslyShow:false,
                sshfShow:false
            };
        },
        watch: {},
        created() {},
        methods: {
            //初始化
            csh() {
                this.dataForm = {};
            },
            init(obj) {
                if (obj) {
                    this.sslyShow = obj.ssly==null||obj.ssly==''?false:true ;
                    this.sshfShow = obj.sshf==null||obj.sshf==''?false:true ;
                    this.tableData.push(obj) ;
                    this.dataForm = obj;
                    this.showRY = obj.khtype=='ry'?true:false;
                    this.$nextTick(() => {
                        this.$refs.multipleTable.doLayout();
                    })
                }

                this.visible = true;
            },

            closeDialog() {
               // this.visible = false;
                this.$emit("closeDetailDialog");
            },
            handleChange(value) {
                console.log(value);
            }
        }
    };
</script>
<style scoped>
  /deep/.boxsty{padding: 20px 30px!important;}
  /deep/.el-table th{padding: 5px!important;}

  .el-divider {
    background-color: #fff;
  }
  .tree-box {
    height: 500px;
    overflow: auto;
  }
</style>
